package kr.hkit.powerjava.chapter11.Programming;

public class Book {
	private String title;//제목
	private String author;//저자
	private int pages;//페이지수
	
	public Book(String title, String author, int pages) {//인자3개 생성자
		this.title = title;
		this.author = author;
		this.pages = pages;
	}
	
	
	public Book(String title, int pages) {//인자2개 생성자
		this.title = title;
		this.pages = pages;
	}


	public Book() {//기본생성자
	}

	//아래로는 접근자 설정자
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public int getPages() {
		return pages;
	}
	public void setPages(int pages) {
		this.pages = pages;
	}


	@Override
	public String toString() {
		return String.format("Book [title=%s, author=%s, pages=%s]", title,
				author, pages);
	}
	
	
}
